package cn.amaake.magicplugin.rpc.model;

import org.ssssssss.magicapi.core.model.MagicEntity;
import org.ssssssss.magicapi.core.model.PathMagicEntity;

import java.util.List;

public class RpcProviderInfo extends PathMagicEntity {


    private String address;

    private boolean isauth = false;

    private String username;

    private String password;

    private String method;

    private String interfaceName;

    private int timeout = 7000;

    private List<RpcParamData> paramData;

    public List<RpcParamData> getParamData() {
        return paramData;
    }

    public void setParamData(List<RpcParamData> paramData) {
        this.paramData = paramData;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public boolean isIsauth() {
        return isauth;
    }

    public void setIsauth(boolean isauth) {
        this.isauth = isauth;
    }


    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public int getTimeout() {
        return timeout;
    }

    public void setTimeout(int timeout) {
        this.timeout = timeout;
    }

    public String getInterfaceName() {
        return interfaceName;
    }

    public void setInterfaceName(String interfaceName) {
        this.interfaceName = interfaceName;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public MagicEntity simple() {
        RpcProviderInfo rpcProviderInfo = new RpcProviderInfo();
        super.simple(rpcProviderInfo);
        return rpcProviderInfo;
    }

    @Override
    public MagicEntity copy() {
        RpcProviderInfo rpcProviderInfo = new RpcProviderInfo();
        super.copyTo(rpcProviderInfo);
        rpcProviderInfo.setAddress(this.address);
        rpcProviderInfo.setTimeout(this.timeout);
        rpcProviderInfo.setUsername(this.username);
        rpcProviderInfo.setPassword(this.password);
        rpcProviderInfo.setIsauth(this.isauth);
        rpcProviderInfo.setMethod(this.method);
        rpcProviderInfo.setInterfaceName(this.interfaceName);
        return rpcProviderInfo;
    }

}
